package codej.ast;


public class Option<T> {

	private final T t;

	public Option(T t) {
		this.t = t;
	}

	public T orElse(T otherT) {
		if (t == null)
			return otherT;
		return t;
	}
	
	public static final <T> T option(T t, T otherT) {
		return new Option<T>(t).orElse(otherT);
	}

}
